#include "Complex.h"
#include<cmath>
#include<iostream>
using namespace std;

Complex::Complex(double r,double i):real(r),imag(i) {}

void Complex::print()
{
    cout<< real <<" + " << imag <<"i\n";
}

Complex Complex::neg() // -
{
    return Complex(-real, -imag );
}

double Complex::abscomplex( )
{
    return sqrt(real*real+imag*imag);
}
